package com.xyc.mapper.impl;

import com.xyc.mapper.UserMapper;
import com.xyc.pojo.User;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;
import java.util.Map;

public class UserMapperImpl extends SqlSessionDaoSupport implements UserMapper {
    public void InsertUser(User user) {
        getSqlSession().getMapper(UserMapper.class).InsertUser(user);
    }


    public List<User> selectUser() {
        return getSqlSession().getMapper(UserMapper.class).selectUser();
    }

    @Override
    public void updateUser(Map map) {
        getSqlSession().getMapper(UserMapper.class).updateUser(map);
    }

    @Override
    public int selectUserCount() {
        return getSqlSession().getMapper(UserMapper.class).selectUserCount();
    }

    @Override
    public User selectUserById(String id) {
        return getSqlSession().getMapper(UserMapper.class).selectUserById(id);
    }

    @Override
    public void addUser(Map map) {
        getSqlSession().getMapper(UserMapper.class).addUser(map);
    }

    @Override
    public void deleteUserById(String id) {
        getSqlSession().getMapper(UserMapper.class).deleteUserById(id);
    }

    @Override
    public List<User> userLimit(String k) {
        return getSqlSession().getMapper(UserMapper.class).userLimit(k);
    }

    @Override
    public List<User> userLike(String info) {
        return getSqlSession().getMapper(UserMapper.class).userLike(info);
    }
}
